Skip to main content

01Microcode Dice

Project Introduction

Using the Microbit's gyroscope for motion detection and LED matrix for number display, this project creates a dice that shows different numbers when shaken.

Programming Logic

When the gyroscope detects shaking, it triggers the LED matrix to display a number.

image-20240531154353481

Experiment Phenomenon

Shake the Microbit and observe the changes on the LED matrix.

MicroCode_accelerometer

Program Enhancement

You can enhance the program by adding a buzzer sound alert. When the gyroscope detects shaking, in addition to displaying a number on the LED matrix, it will also produce a sound.

image-20240531154943660

Saving the Program

image-20240603162823841

Loading the Program

Even after turning off the device, you can reload the previously saved program when you turn it back on.

image-20240603162642806